home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Qu.......ke Neue Level
/
KroGer Software GmbH - Qu_ke.iso
/
UTILITY
/
PRG8.ZIP
/
SPRVIEW.C
< prev
next >
Wrap
C/C++ Source or Header
|
1996-03-03
|
949b
|
39 lines
/*
* SprView.c - Uses the routines in the QEU library to extract data
* from a Quake sprite file.
*
* Do whatever you want with this file, but don't blame me if
* something doesn't work. If you manage to destroy your hard disk
* with it, that's too bad for you... Use it at your own risks!
*/
#include "qeu.h"
#include "q_misc.h"
#include "q_files.h"
#include "f_bitmap.h"
#include "f_sprite.h"
void main(int argc, char *argv[])
{
char *filename;
FILE *file;
SpritePtr sprite;
int ftype;
argv++;
argc--;
if (argc != 1)
ProgError("Usage: sprview <filename.spr>");
filename = *argv;
file = OpenFileReadMagic(filename, &ftype);
if (file == NULL)
ProgError("File not found (%s)", filename);
if (ftype != FTYPE_SPRITE)
ProgError("File is not a sprite file (%s)", filename);
sprite = ReadSprite(file, 0L);
fclose(file);
DumpSprite(stdout, sprite);
FreeSprite(sprite);
}